Skip to content

fix: swiftly is stuck during dependency check on Fedora#520

Open
terraputix wants to merge 1 commit intoswiftlang:mainfrom
terraputix:fix/swiftly-stuck-during-dep-check
Open

fix: swiftly is stuck during dependency check on Fedora#520
terraputix wants to merge 1 commit intoswiftlang:mainfrom
terraputix:fix/swiftly-stuck-during-dep-check

Conversation

@terraputix
Copy link
Copy Markdown

Fix for #490.

The underlying issue was that using .discarded instead of .string(limit: 100 * 1024) will hang when waiting for user input. I verified this by running a bash script which waits for user input instead of yum list installed (from the changed line).
Since result.standardOutput is not currently being used the limit: 100 * 1024 could be smaller, but for simplicity I used the same value as in the apt-get version.

Moreover, yum list installed is not fully correct. Compare the following:

> yum list installed libuuid-devel
Updating and loading repositories:
Repositories loaded.
Available packages
libuuid-devel.i686   2.40.4-10.fc42 updates
libuuid-devel.x86_64 2.40.4-10.fc42 updates
> echo $?
0
> yum list --installed libuuid-devel
No matching packages to list
> echo $?
1

This shows that using --installed instead of installed will correctly return a non 0 exit code if a package is not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant